1. Field of the Invention
This invention relates to an image processing method and apparatus in which contour vectors of an input binary image are extracted, and a binary image is generated based on the extracted contour vectors.
2. Description of the Related Art
The asignee of the present application has proposed techniques for extracting contour information of a binary image in Japanese Patent Application Nos. 2-281958 (1990) and 3-272701 (1991).
In Japanese Patent Application No. 2-281958 (1990), a technique is disclosed in which attention is paid to a certain pixel (picture element), and it is determined whether or not the target pixel is a pixel situated at a contour position in accordance with the state of the target pixel and a plurality of pixels surrounding it. When it has been determined that the target pixel is a contour pixel, vectors in the horizontal and vertical directions are extracted in accordance with the state of the target pixel and pixels surrounding it.
According to this technique, since all contour lines in an image can be extracted in a single raster scanning operation, and an image memory for storing all image data is not required, the capacity of a memory can be reduced. This technique is a contour-line extraction method which can extract contour-line vector data providing a significant width even for a fine line having the width of one pixel by extracting contours in units of an edge of each pixel of an input image, instead of extracting contours by connecting the central positions of respective pixels of the image. Furthermore, the present application describes that not only contour lines of a region comprising pixels connected in four directions in the original image are extracted, but also contour lines of a region comprising pixels connected in eight directions can also be extracted.
In Japanese Patent Application No. 3-272701 (1991), with respect to the rules when extracting contour points of a region comprising eight connected pixels disclosed in Japanese Patent Application No. 2-281958 (1990), a method is proposed in which each of two contour points set between two black pixels connected in an oblique direction is defined at each time period when it becomes a target pixel. By adopting such a method, each extraction means can be operated independently from the state of other surrounding pixels.
On the other hand, in Japanese Patent Application No. 3-345062 (1991), the assignee of the present application has proposed an image processing apparatus for obtaining a variable-magnification image having high picture quality using contour information of a binary image. In this proposal, outline vectors are extracted from a binary image, outline vectors subjected to smooth magnification-varying processing with a desired (arbitrary) magnification are formed in the state of expression of the extracted outline vectors, and a binary image is regenerated from the outline vectors subjected to the smooth magnification-varying processing. Thus, a digital binary image having high picture quality subjected to magnification-varying processing with the desired (arbitrary) magnification is obtained. Methods for extracting outline vectors from a binary image are disclosed, for example, in the above-described Japanese Patent Application Nos. 2-281958 (1990) and 3-272701 (1991).
However, in the technique described in Japanese Patent Application No. 3-345062 (1991), if the user intends to obtain a variable-magnification image using outline vectors extracted using the rules disclosed in the above-described Japanese Patent Application Nos. 2-281958 (1990) and 3-272701 (1991), the widths of pixels at fine-line portions of the generated output image in some cases tend to increase when magnification-varying processing of a low magnification of about 1 to 2 times is performed. That is, in the methods disclosed in the above-described Japanese Patent Application Nos. 2-281988 (1990) and 3-272701 (1991), while contour vectors are extracted by defining a contour point at the exact midpoint between a white pixel and a black pixel, a pixel regeneration unit processes a pixel indicated by a contour coordinate value of the obtained image subjected to smoothing and magnification-varying processing as a black pixel. Accordingly, in the case of a low magnification, if pixels on contour lines defined so as to surround a pixel in the original image are black pixels, and a black pixel is present in the region surrounded by the contour lines, the area of regions of black pixels tends to increase at a non-neglible ratio from the area defined by the original magnification compared with the area of regions of white pixels.